package com.valley.dream.tihai.util.result;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result {

    private Integer code;

    private String msg;

    public static Result ok(){
        return new Result(200, "成功");
    }

    public static Result ok(String msg){
        return new Result(200, msg);
    }

    public static Result fail(){
        return new Result(400, "失败");
    }

    public static Result fail(String msg){
        return new Result(400, msg);
    }

}
